#pragma once

#include "CmdHandler3.h"

class Ent;
class Surface;
class RuledSurfaceHandler : public CmdHandler3
{
	Q_OBJECT
public:
	Q_INVOKABLE RuledSurfaceHandler();
	~RuledSurfaceHandler();

	virtual void input(const QVariant& data, const QString& rawInput, CommandSource cs) override;

protected:
	std::shared_ptr<Surface> makeRuledSurface(bool reverseCurve2);

	std::shared_ptr<Ent> m_curve1;
	std::shared_ptr<Ent> m_curve2;
	osg::Vec3d m_point; // used by PointRuledSurfaceHandler
	std::shared_ptr<Surface> m_surface;
};
